{set:
	$seo_data    = array();
	$site_config = new Config('site_config');
	$site_config = $site_config->getInfo();
	$seo_data['title'] = "用户登录_".$site_config['name'];
	seo::set($seo_data);
}

<section class="login">
	<div class="form">
	    <form action='{url:/simple/login_act}' method='post'>
			<input type="hidden" name='callback' />
	        <ul>
	            <li class="user-info">
	                <input type="text" class='form-control' placeholder="请输入用户名" initmsg="验证通过" name="login_info" id="login_info" value="{echo:ICookie::get('loginName');}" pattern='required' alt='填写用户名或邮箱' />
	            </li>
	            <li class="user-info">
					<input type="password" class='form-control' placeholder="密码" name="password" pattern='^\S{6,32}$' alt='填写密码' />
	            </li>

					
	            <li class="enter">
	                <button type="submit" class='btn btn-xs btn-primary col-lg-5 col-xs-5' >立即登录</button>
	            </li>
	            <li class="clearfix yui3-u-1-1">
	                <span class="auto">
	                	<a href="{url:simple/reg}" >还没有注册？</a><i class="fa fa-chevron-right" style="color: #D4D5D0;float:none"></i>
	                </span>
	                   <span class="auto yui3-u-2-3">
	                	<a href="{url:simple/find_password}" >忘记密码</a>
	                </span>
	            </li>

		<li>
	            	
							{foreach:items=Api::run('getOauthList')}
							<a href="javascript:oauthlogin('{$item['id']}');"><img src='{webroot:$item[logo]}' /></a>
							{/foreach}

		</li>
	        </ul>
	    </form>
	</div>
</section>

<script type='text/javascript'>
{set:$callback = IReq::get('callback') ? IFilter::clearUrl(IReq::get('callback')) :IUrl::getRefRoute()}

//DOM加载结束
$(function(){
	//回调地址设置
	$('input[name="callback"]').val("{$callback}");
	$('.reg_btn').attr('href',"{url:/simple/reg?callback=$callback}");

	//错误信息提示
	{if:$this->message}
	alert("{$this->message}");
	{/if}
});

//多平台登录
function oauthlogin(oauth_id)
{
	$.getJSON('{url:/simple/oauth_login}',{"id":oauth_id,"callback":"{$callback}"},function(content){
		if(content.isError == false)
		{
			window.location.href = content.url;
		}
		else
		{
			alert(content.message);
		}
	});
}

//下一步操作
function next_step()
{
	var step_val = $('[name="next_step"]:checked').val();
	if(step_val == 'acount')
	{
		{set:$url = rtrim($callback,"/")."/tourist/yes"}
		window.location.href = '{url:$url}';
	}
	else if(step_val == 'reg')
	{
		window.location.href = '{url:/simple/reg?callback=$callback}';
	}
}

$(function()
{
	$(".kros_foot").css({ display: "none" });
    $(".s_footer").css({ display: "none" });
	$("#kros_c").css({ color: "#ff0011" });
    $(".headline").text('登录');
})
</SCRIPT>